/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); */

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    margin: 0;
    /* 字都没有,要字体干啥 */
    /* font-family: 'Roboto',sans-serif; */

    /* 为背景图做 预设值 */
    background-size: cover;
    background-position: center center;
    transition: .4s;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0,0,0,.7);
    z-index: -1;
}

.slider-container {
    position: relative;
    overflow: hidden;
    width: 70vw;
    height: 70vh;
    /* 屏幕 中间的相框 */
    box-shadow: 0px 3px 6px rgba(0,0,0,.15),0px 3px 6px rgba(0,0,0,.15);
}

.slide {
    position: absolute;
    /* 注意:此处位置为 (100-70相框)/2=15 */
    top: -15vh;
    left: -15vw;
    width: 100vw;
    height: 100vh;
    background-position:center center;
    background-size: cover;
    /* 默认 隐形,活动时 显形 */
    opacity: 0;
    transition: .4s ease;
    z-index: 1;
}

.slide.active {
    /* 活动图像 显形 */
    opacity: 1;
}

.arrow {
    /* 固定位置 按钮垂直居中 */
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    padding: 20px;
    color: #fff;
    background-color: transparent;
    font-size: 30px;
    border: solid 2px lightcoral;
    cursor: pointer;
}

.arrow:focus {
    outline: none;
}

.left-arrow {
    /* x轴坐标为 边框距离页边距 减去 按钮本身的宽度 */
    left: calc(15vw - 65px);
}

.right-arrow {
    right: calc(15vw - 65px);
}